home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 27 code / Internet_Config_Assistant.sit / Internet Config Assistant / toolkit / CPoint.h < prev    next >
MacBinary  |  1996-04-12  |  2.5 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Apr 12 01:48:31 1996, modified Fri Apr 12 01:48:31 1996, creator 'CWIE', type ASCII, 1845 bytes "CPoint.h" , at 0x7b5 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 43 50 6f 69 6e 74 | 2e 68 00 00 00 00 00 00 |..CPoint|.h......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 07 35 00 | 00 01 9a ad 93 9f 2f ad |......5.|....../.|
|00000060| 93 9f 2f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |../.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c1 4e 00 00 |........|.....N..|
|00000080| 0d 23 69 66 6e 64 65 66 | 09 5f 5f 43 50 4f 49 4e |.#ifndef|.__CPOIN|
|00000090| 54 5f 5f 0d 23 64 65 66 | 69 6e 65 09 5f 5f 43 50 |T__.#def|ine.__CP|
|000000a0| 4f 49 4e 54 5f 5f 0d 0d | 23 69 6e 63 6c 75 64 65 |OINT__..|#include|
|000000b0| 20 3c 51 75 69 63 6b 64 | 72 61 77 2e 68 3e 0d 0d | <Quickd|raw.h>..|
|000000c0| 63 6c 61 73 73 20 43 52 | 65 63 74 3b 0d 0d 74 79 |class CR|ect;..ty|
|000000d0| 70 65 64 65 66 20 53 49 | 6e 74 31 36 20 47 72 61 |pedef SI|nt16 Gra|
|000000e0| 70 68 69 63 61 6c 55 6e | 69 74 3b 0d 0d 63 6c 61 |phicalUn|it;..cla|
|000000f0| 73 73 20 43 50 6f 69 6e | 74 0d 7b 0d 70 75 62 6c |ss CPoin|t.{.publ|
|00000100| 69 63 3a 0d 09 50 6f 69 | 6e 74 20 66 50 6f 69 6e |ic:..Poi|nt fPoin|
|00000110| 74 3b 0d 0d 09 2f 2f 20 | 63 6f 6e 73 74 72 75 63 |t;...// |construc|
|00000120| 74 6f 72 73 0d 09 69 6e | 6c 69 6e 65 20 43 50 6f |tors..in|line CPo|
|00000130| 69 6e 74 28 29 3b 0d 09 | 69 6e 6c 69 6e 65 20 43 |int();..|inline C|
|00000140| 50 6f 69 6e 74 28 47 72 | 61 70 68 69 63 61 6c 55 |Point(Gr|aphicalU|
|00000150| 6e 69 74 20 58 2c 20 47 | 72 61 70 68 69 63 61 6c |nit X, G|raphical|
|00000160| 55 6e 69 74 20 59 29 3b | 0d 09 69 6e 6c 69 6e 65 |Unit Y);|..inline|
|00000170| 20 43 50 6f 69 6e 74 28 | 63 6f 6e 73 74 20 43 50 | CPoint(|const CP|
|00000180| 6f 69 6e 74 26 20 70 74 | 29 3b 0d 09 69 6e 6c 69 |oint& pt|);..inli|
|00000190| 6e 65 20 43 50 6f 69 6e | 74 28 63 6f 6e 73 74 20 |ne CPoin|t(const |
|000001a0| 50 6f 69 6e 74 26 20 70 | 74 29 3b 0d 09 0d 09 2f |Point& p|t);..../|
|000001b0| 2f 20 64 65 73 74 72 75 | 63 74 6f 72 0d 09 69 6e |/ destru|ctor..in|
|000001c0| 6c 69 6e 65 20 7e 43 50 | 6f 69 6e 74 28 29 20 7b |line ~CP|oint() {|
|000001d0| 7d 3b 0d 0d 09 2f 2f 20 | 61 73 73 69 67 6e 6d 65 |};...// |assignme|
|000001e0| 6e 74 0d 09 43 50 6f 69 | 6e 74 26 20 6f 70 65 72 |nt..CPoi|nt& oper|
|000001f0| 61 74 6f 72 3d 28 63 6f | 6e 73 74 20 43 50 6f 69 |ator=(co|nst CPoi|
|00000200| 6e 74 20 26 66 72 6f 6d | 29 3b 0d 09 76 6f 69 64 |nt &from|);..void|
|00000210| 20 53 65 74 28 47 72 61 | 70 68 69 63 61 6c 55 6e | Set(Gra|phicalUn|
|00000220| 69 74 20 58 2c 20 47 72 | 61 70 68 69 63 61 6c 55 |it X, Gr|aphicalU|
|00000230| 6e 69 74 20 59 29 3b 0d | 0d 09 76 6f 69 64 20 43 |nit Y);.|..void C|
|00000240| 6f 6e 73 74 72 61 69 6e | 54 6f 28 63 6f 6e 73 74 |onstrain|To(const|
|00000250| 20 43 52 65 63 74 26 20 | 72 65 63 74 29 3b 0d 09 | CRect& |rect);..|
|00000260| 09 0d 09 2f 2f 20 61 72 | 69 74 68 6d 65 74 69 63 |...// ar|ithmetic|
|00000270| 0d 09 43 50 6f 69 6e 74 | 20 6f 70 65 72 61 74 6f |..CPoint| operato|
|00000280| 72 2b 28 63 6f 6e 73 74 | 20 43 50 6f 69 6e 74 26 |r+(const| CPoint&|
|00000290| 29 20 63 6f 6e 73 74 3b | 0d 09 43 50 6f 69 6e 74 |) const;|..CPoint|
|000002a0| 20 6f 70 65 72 61 74 6f | 72 2d 28 63 6f 6e 73 74 | operato|r-(const|
|000002b0| 20 43 50 6f 69 6e 74 26 | 29 20 63 6f 6e 73 74 3b | CPoint&|) const;|
|000002c0| 0d 09 43 50 6f 69 6e 74 | 26 20 6f 70 65 72 61 74 |..CPoint|& operat|
|000002d0| 6f 72 2b 3d 28 63 6f 6e | 73 74 20 43 50 6f 69 6e |or+=(con|st CPoin|
|000002e0| 74 26 29 3b 0d 09 43 50 | 6f 69 6e 74 26 20 6f 70 |t&);..CP|oint& op|
|000002f0| 65 72 61 74 6f 72 2d 3d | 28 63 6f 6e 73 74 20 43 |erator-=|(const C|
|00000300| 50 6f 69 6e 74 26 29 3b | 0d 0d 09 2f 2f 20 72 65 |Point&);|...// re|
|00000310| 6c 61 74 69 6f 6e 61 6c | 0d 09 42 6f 6f 6c 65 61 |lational|..Boolea|
|00000320| 6e 20 6f 70 65 72 61 74 | 6f 72 21 3d 28 63 6f 6e |n operat|or!=(con|
|00000330| 73 74 20 43 50 6f 69 6e | 74 26 29 20 63 6f 6e 73 |st CPoin|t&) cons|
|00000340| 74 3b 0d 09 42 6f 6f 6c | 65 61 6e 20 6f 70 65 72 |t;..Bool|ean oper|
|00000350| 61 74 6f 72 3d 3d 28 63 | 6f 6e 73 74 20 43 50 6f |ator==(c|onst CPo|
|00000360| 69 6e 74 26 29 20 63 6f | 6e 73 74 3b 0d 09 0d 09 |int&) co|nst;....|
|00000370| 2f 2f 20 63 6f 6e 76 65 | 72 73 69 6f 6e 0d 09 69 |// conve|rsion..i|
|00000380| 6e 6c 69 6e 65 20 6f 70 | 65 72 61 74 6f 72 20 50 |nline op|erator P|
|00000390| 6f 69 6e 74 2a 28 29 3b | 0d 09 69 6e 6c 69 6e 65 |oint*();|..inline|
|000003a0| 20 6f 70 65 72 61 74 6f | 72 20 63 6f 6e 73 74 20 | operato|r const |
|000003b0| 50 6f 69 6e 74 2a 28 29 | 20 63 6f 6e 73 74 3b 0d |Point*()| const;.|
|000003c0| 09 69 6e 6c 69 6e 65 20 | 6f 70 65 72 61 74 6f 72 |.inline |operator|
|000003d0| 20 50 6f 69 6e 74 28 29 | 20 63 6f 6e 73 74 3b 09 | Point()| const;.|
|000003e0| 09 0d 09 69 6e 6c 69 6e | 65 20 47 72 61 70 68 69 |...inlin|e Graphi|
|000003f0| 63 61 6c 55 6e 69 74 20 | 58 28 76 6f 69 64 29 20 |calUnit |X(void) |
|00000400| 63 6f 6e 73 74 3b 09 0d | 09 69 6e 6c 69 6e 65 20 |const;..|.inline |
|00000410| 47 72 61 70 68 69 63 61 | 6c 55 6e 69 74 20 59 28 |Graphica|lUnit Y(|
|00000420| 76 6f 69 64 29 20 63 6f | 6e 73 74 3b 09 09 20 09 |void) co|nst;.. .|
|00000430| 20 0d 7d 3b 0d 0d 69 6e | 6c 69 6e 65 20 43 50 6f | .};..in|line CPo|
|00000440| 69 6e 74 3a 3a 43 50 6f | 69 6e 74 28 29 0d 7b 0d |int::CPo|int().{.|
|00000450| 7d 0d 0d 69 6e 6c 69 6e | 65 20 43 50 6f 69 6e 74 |}..inlin|e CPoint|
|00000460| 3a 3a 6f 70 65 72 61 74 | 6f 72 20 50 6f 69 6e 74 |::operat|or Point|
|00000470| 2a 28 29 0d 7b 0d 09 72 | 65 74 75 72 6e 20 26 66 |*().{..r|eturn &f|
|00000480| 50 6f 69 6e 74 3b 0d 7d | 0d 0d 69 6e 6c 69 6e 65 |Point;.}|..inline|
|00000490| 20 43 50 6f 69 6e 74 3a | 3a 6f 70 65 72 61 74 6f | CPoint:|:operato|
|000004a0| 72 20 63 6f 6e 73 74 20 | 50 6f 69 6e 74 2a 28 29 |r const |Point*()|
|000004b0| 20 63 6f 6e 73 74 0d 7b | 0d 09 72 65 74 75 72 6e | const.{|..return|
|000004c0| 20 28 50 6f 69 6e 74 20 | 2a 20 63 6f 6e 73 74 29 | (Point |* const)|
|000004d0| 26 66 50 6f 69 6e 74 3b | 0d 7d 0d 0d 69 6e 6c 69 |&fPoint;|.}..inli|
|000004e0| 6e 65 20 43 50 6f 69 6e | 74 3a 3a 6f 70 65 72 61 |ne CPoin|t::opera|
|000004f0| 74 6f 72 20 50 6f 69 6e | 74 28 29 20 63 6f 6e 73 |tor Poin|t() cons|
|00000500| 74 0d 7b 0d 09 72 65 74 | 75 72 6e 20 66 50 6f 69 |t.{..ret|urn fPoi|
|00000510| 6e 74 3b 0d 7d 09 0d 0d | 69 6e 6c 69 6e 65 20 43 |nt;.}...|inline C|
|00000520| 50 6f 69 6e 74 3a 3a 43 | 50 6f 69 6e 74 28 47 72 |Point::C|Point(Gr|
|00000530| 61 70 68 69 63 61 6c 55 | 6e 69 74 20 58 2c 20 47 |aphicalU|nit X, G|
|00000540| 72 61 70 68 69 63 61 6c | 55 6e 69 74 20 59 29 0d |raphical|Unit Y).|
|00000550| 7b 0d 09 66 50 6f 69 6e | 74 2e 68 20 3d 20 58 3b |{..fPoin|t.h = X;|
|00000560| 0d 09 66 50 6f 69 6e 74 | 2e 76 20 3d 20 59 3b 0d |..fPoint|.v = Y;.|
|00000570| 7d 0d 0d 69 6e 6c 69 6e | 65 20 43 50 6f 69 6e 74 |}..inlin|e CPoint|
|00000580| 3a 3a 43 50 6f 69 6e 74 | 28 63 6f 6e 73 74 20 43 |::CPoint|(const C|
|00000590| 50 6f 69 6e 74 26 20 70 | 74 29 0d 7b 0d 09 66 50 |Point& p|t).{..fP|
|000005a0| 6f 69 6e 74 2e 68 20 3d | 20 70 74 2e 66 50 6f 69 |oint.h =| pt.fPoi|
|000005b0| 6e 74 2e 68 3b 0d 09 66 | 50 6f 69 6e 74 2e 76 20 |nt.h;..f|Point.v |
|000005c0| 3d 20 70 74 2e 66 50 6f | 69 6e 74 2e 76 3b 0d 7d |= pt.fPo|int.v;.}|
|000005d0| 0d 0d 69 6e 6c 69 6e 65 | 20 43 50 6f 69 6e 74 3a |..inline| CPoint:|
|000005e0| 3a 43 50 6f 69 6e 74 28 | 63 6f 6e 73 74 20 50 6f |:CPoint(|const Po|
|000005f0| 69 6e 74 26 20 70 74 29 | 0d 7b 0d 09 66 50 6f 69 |int& pt)|.{..fPoi|
|00000600| 6e 74 2e 68 20 3d 20 70 | 74 2e 68 3b 0d 09 66 50 |nt.h = p|t.h;..fP|
|00000610| 6f 69 6e 74 2e 76 20 3d | 20 70 74 2e 76 3b 0d 7d |oint.v =| pt.v;.}|
|00000620| 0d 0d 69 6e 6c 69 6e 65 | 20 43 50 6f 69 6e 74 20 |..inline| CPoint |
|00000630| 26 43 50 6f 69 6e 74 3a | 3a 6f 70 65 72 61 74 6f |&CPoint:|:operato|
|00000640| 72 3d 28 63 6f 6e 73 74 | 20 43 50 6f 69 6e 74 26 |r=(const| CPoint&|
|00000650| 20 66 72 6f 6d 29 0d 7b | 0d 09 2f 2f 20 64 6f 6e | from).{|..// don|
|00000660| 27 74 20 6e 65 65 64 20 | 74 6f 20 77 6f 72 72 79 |'t need |to worry|
|00000670| 20 61 62 6f 75 74 20 22 | 74 68 69 73 3d 3d 66 72 | about "|this==fr|
|00000680| 6f 6d 22 0d 09 66 50 6f | 69 6e 74 2e 68 20 3d 20 |om"..fPo|int.h = |
|00000690| 66 72 6f 6d 2e 66 50 6f | 69 6e 74 2e 68 3b 0d 09 |from.fPo|int.h;..|
|000006a0| 66 50 6f 69 6e 74 2e 76 | 20 3d 20 66 72 6f 6d 2e |fPoint.v| = from.|
|000006b0| 66 50 6f 69 6e 74 2e 76 | 3b 0d 09 72 65 74 75 72 |fPoint.v|;..retur|
|000006c0| 6e 20 2a 74 68 69 73 3b | 0d 7d 0d 0d 69 6e 6c 69 |n *this;|.}..inli|
|000006d0| 6e 65 20 76 6f 69 64 20 | 43 50 6f 69 6e 74 3a 3a |ne void |CPoint::|
|000006e0| 53 65 74 28 47 72 61 70 | 68 69 63 61 6c 55 6e 69 |Set(Grap|hicalUni|
|000006f0| 74 20 58 2c 20 47 72 61 | 70 68 69 63 61 6c 55 6e |t X, Gra|phicalUn|
|00000700| 69 74 20 59 29 0d 7b 0d | 09 66 50 6f 69 6e 74 2e |it Y).{.|.fPoint.|
|00000710| 68 20 3d 20 58 3b 0d 09 | 66 50 6f 69 6e 74 2e 76 |h = X;..|fPoint.v|
|00000720| 20 3d 20 59 3b 0d 7d 0d | 0d 69 6e 6c 69 6e 65 20 | = Y;.}.|.inline |
|00000730| 47 72 61 70 68 69 63 61 | 6c 55 6e 69 74 20 43 50 |Graphica|lUnit CP|
|00000740| 6f 69 6e 74 3a 3a 58 28 | 76 6f 69 64 29 20 63 6f |oint::X(|void) co|
|00000750| 6e 73 74 0d 7b 0d 09 72 | 65 74 75 72 6e 20 66 50 |nst.{..r|eturn fP|
|00000760| 6f 69 6e 74 2e 68 3b 0d | 7d 0d 0d 69 6e 6c 69 6e |oint.h;.|}..inlin|
|00000770| 65 20 47 72 61 70 68 69 | 63 61 6c 55 6e 69 74 20 |e Graphi|calUnit |
|00000780| 43 50 6f 69 6e 74 3a 3a | 59 28 76 6f 69 64 29 20 |CPoint::|Y(void) |
|00000790| 63 6f 6e 73 74 0d 7b 0d | 09 72 65 74 75 72 6e 20 |const.{.|.return |
|000007a0| 66 50 6f 69 6e 74 2e 76 | 3b 0d 7d 0d 0d 0d 23 65 |fPoint.v|;.}...#e|
|000007b0| 6e 64 69 66 0d 00 00 00 | 00 00 00 00 00 00 00 00 |ndif....|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000810| 00 00 ac a7 0b 65 78 63 | 65 70 74 69 6f 6e 2e 68 |.....exc|eption.h|
|00000820| 02 00 00 00 54 45 58 54 | 43 57 49 45 01 00 00 68 |....TEXT|CWIE...h|
|00000830| 08 43 50 6f 69 6e 74 2e | 68 6f 02 00 00 00 54 45 |.CPoint.|ho....TE|
|00000840| 58 54 43 57 49 45 01 00 | 00 34 01 00 00 00 00 00 |XTCWIE..|.4......|
|00000850| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 34 01 00 |..TEXTCW|IE...4..|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 ad 17 4a 53 00 00 | 07 35 00 00 01 9a 00 00 |....JS..|.5......|
|00000880| 00 00 00 00 00 00 0d 00 | 00 00 ac a7 07 66 63 6e |........|.....fcn|
|00000890| 74 6c 2e 68 02 00 00 00 | 54 45 58 54 43 57 49 45 |tl.h....|TEXTCWIE|
|000008a0| 01 00 00 9c 00 00 00 00 | 00 00 ac c4 00 00 00 00 |........|........|
|000008b0| 07 2b 00 00 80 00 00 00 | 00 00 00 00 00 00 00 00 |.+......|........|
|000008c0| ab 89 15 6c ac 45 2a b1 | 00 00 00 00 00 00 00 00 |...l.E*.|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 72 9a |........|......r.|
|000008e0| 00 01 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 0d 00 00 00 ac a7 |........|........|
|00000900| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 03 | 00 04 00 8b 00 5b 02 93 |........|.....[..|
|00000930| 01 fc 00 8b 00 5b 02 93 | 01 fc ad fc 29 09 00 00 |.....[..|....)...|
|00000940| 07 15 00 00 07 15 00 00 | 04 98 01 00 00 00 00 04 |........|........|
|00000950| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00000960| 00 00 00 46 02 b0 f3 38 | 2f be 00 00 00 1c 00 46 |...F...8|/......F|
|00000970| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000980| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000990| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+